home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network Support Library
/
RoseWare - Network Support Library.iso
/
hardware
/
test.exe
/
TESTW.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1993-03-29
|
1KB
|
54 lines
Program TestW; { 1993 NewsMaker Systems. Freeware }
{ Start this program first }
Uses Dos,Crt;
Type TestRec = Array[1..512] Of Byte;
Var X : Integer;
TestBuf : TestRec;
I : Integer;
OutFile : File Of TestRec;
OutputValue : Byte;
LoopCount: LongInt;
Begin
FillChar (TestBuf,SizeOf(TestBuf),Ord('0')); { Init TestBuf with 0 }
Assign (OutFile, 'TEST.DAT'); { Create the test file }
Rewrite (OutFile);
Write (OutFile, TestBuf);
Close (OutFile);
ClrScr;
TextColor(LightRed);
Write('TESTW ');
TextColor(White);
HighVideo;
Write('Writing TEST.DAT file. Press ALT to Quit');
LowVideo;
Window(1,2,80,25);
LoopCount := 0;
OutputValue := 1;
While Mem[$40:$17] AND byte($08) = 0 Do { Check for ALT key }
Begin
FileMode := $22; { Open for Read/Write, Deny Write (allow read) }
Assign (OutFile, 'TEST.DAT');
Reset (OutFile);
FillChar (TestBuf,SizeOf(TestBuf),OutputValue+Ord('0')); {1-9}
Inc (OutputValue);
If OutputValue >=10 Then OutputValue := 1;
Write (OutFile, TestBuf);
inc(LoopCount);
{ If LoopCount Mod 10 = 0 then } { Can be added to speed Writes }
WriteLn ('OK ',Char(TestBuf[1]),' ',LoopCount);
Close (OutFile);
End;
End.